<template>
<div id="app">
        <h2>总金额</h2>

        <input type="number" v-model="totalAmount">
        <br>
        <span>今天吃饭用了 {{totalAmount}} 元</span>

        <h2>用餐参与人</h2>

        <input type="text">
        <button @click="add">添加</button>

        <ul ref="name">
            <li>
                第1位: jack,
                <span>需要支付 0 元</span>
                <button>X</button>
            </li>
        </ul>
    </div>

</template>

<script>
export default {
data(){
return {
    totalAmount:0,
    equally:0,
    num:1
}

},
methods: {
    add(){
        console.log(this.$refs['name'].append());

    }
}
}
</script>
<style lang='scss' scoped>

</style>
